var link = document.createElement('link');
<% if (_charset) { %>
link.charset = 'utf-8';
<% } %>
if (<%- SCRIPT_NONCE %>) {
  link.setAttribute("nonce", <%- SCRIPT_NONCE %>);
}
link.rel = 'modulepreload';
link.href = <%- PUBLIC_PATH %> + <%- GET_CHUNK_SCRIPT_FILENAME %>(chunkId);
<% if (_cross_origin == "use-credentials") { %>
link.crossOrigin = 'use-credentials';
<% } else if (_cross_origin != "") { %>
if (link.href.indexOf(window.location.origin + '/') !== 0) {
  link.crossOrigin = '<%- _cross_origin %>';
}
<% } %>